extends IStateCondition


class_name StateDurationCondition


## 状态持续时间
@export var duration: float = 1.0


var __state_duration: float = 0


func enter() -> void:
    __state_duration = 0

func update(delta: float) -> void:
    __state_duration += delta
    if duration > 0 and __state_duration > duration:
        jump()
